import os, sys
import pytest

curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
print(rootPath)

if __name__ == '__main__':
    # os.system(r'del /s /q ..\allure-report\*.*')
    # os.system(r'del /s /q ..\allure-results\*.*')
    # os.system(r'del /s /q ..\allure-zip-report\*.*')
    # 运行用例

    pytest.main()
    # print(os.getcwd())
    # # 生成测试报告
    # os.system('allure generate ../allure-results/ -o ../allure-report/ --clean')
    # 压缩测试报告
    # zip_file('../allure-report', '../allure-zip-report/report.zip')
    # # 发送邮件
    # Email().send_email()
